<template>
  <div id="order">
    <div v-if="true" class="ooder">
      <router-link
        :to="{name: 'Orderdetail'}"
        tag="div"
        class="order">
        <div class="success isFinish">已完成</div>
        <div class="text">
          <h4>订单编号：548941654164981</h4>
          <span>合计：190.00元</span>
        </div>
        <div class="watch">
          <p>查看详情</p>
          <img src="../../assets/youjiantou.png" alt="">
        </div>
      </router-link>
      <router-link
        :to="{name: 'Orderdetail'}"
        tag="div"
        class="order">
        <div class="faild isFinish">购买失败</div>
        <div class="text">
          <h4>订单编号：548941654164981</h4>
          <span>合计：190.00元</span>
        </div>
        <div class="watch">
          <p>查看详情</p>
          <img src="../../assets/youjiantou.png" alt="">
        </div>
      </router-link>
    </div>
    <div class="kong" v-if="false">
      <div class="empty">
        <img src="../../assets/dingdankong.png" alt="空">
        <p>暂无相关订单</p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Order',
  created () {
    document.title = '我的订单'
  }
}
</script>

<style lang='scss' scoped>
#order{
  height: 100%;
  height: 100%;
  .ooder{
    padding: 4vw 3.46vw 0 3.46vw;
    .order{
      height: 60.26vw;
      background-color: #fff;
      padding: 15.2vw 0 0 3.46vw;
      box-sizing: border-box;
      position: relative;
      margin-bottom: 4vw;
      .isFinish{
        height: 7.73vw;
        text-align: center;
        line-height: 7.73vw;
        color: #fff;
        border-top-right-radius: 4vw;
        border-bottom-right-radius: 4vw;
        position: absolute;
        top: 3.73vw;
        left: 0;
        font-size: 4.53vw;
        font-weight: bold;
        font-family: SourceHanSansCN-Bold;
        &.success{
          width: 20.53vw;
          background-color: #0A6DFF;
        }
        &.faild{
          width: 25.06vw;
          background-color: #f00;
        }
      }
      .text{
        height: 28.73vw;
        border-top: 1px solid #eee;
        border-bottom: 1px solid #eee;
        h4{
          font-size: 4.53vw;
          font-weight: bold;
          color: rgba(22,22,22,1);
          margin: 8vw 0 5.33vw 0;
          box-sizing: border-box;
          font-family: SourceHanSansCN-Bold;
        }
        span{
          font-size: 3.73vw;
          font-weight: 400;
          color: rgba(168,168,168,1);
          font-family:SourceHanSansCN-Regular;
        }
      }
      .watch{
        height: 15.2vw;
        padding: 0 3.46vw 0 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        p{
          font-family:SourceHanSansCN-Regular;
          font-size: 4.53vw;
          font-weight: 400;
          color: rgba(22,22,22,1);
        }
        img{
          width: 2.4vw;
          height: 4.26vw;
        }
      }
    }
  }
  .kong{
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    .empty{
      margin-top: 47.86vw;
      display: flex;
      flex-direction: column;
      align-items: center;
      img{
        width: 17.6vw;
        height: 30.66vw;
        margin-bottom: 2.66vw;
      }
      p{
        font-size: 3.73vw;
        font-family: SourceHanSansCN-Regular;
        font-weight: 400;
        color:rgba(134,134,134,1);
        line-height: 5.6vw;
      }
    }
  }
}
</style>
